from users.models import *
from rest_framework.serializers import ModelSerializer

class CateSer(ModelSerializer):
    class Meta:
        model = Category
        fields = "__all__"

class GoodsSer(ModelSerializer):
    class Meta:
        model = Goods
        fields = "__all__"

class CartSer(ModelSerializer):
    class Meta:
        model = Cart
        fields = "__all__"

class ShowCartSer(ModelSerializer):
    goods = GoodsSer()
    class Meta:
        model = Cart
        fields = "__all__"

class OrderInfoSer(ModelSerializer):
    goods = GoodsSer()
    class Meta:
        model = OrderInfo
        fields = "__all__"

class OrderDetailSer(ModelSerializer):
    goods = GoodsSer()
    class Meta:
        model = OrderDetail
        fields = "__all__"